//
//  KZKouYuInputTestVC.m
//  lg_zhinengbeikao_english
//
//  Created by 朱凯 on 2019/1/3.
//  Copyright © 2019 zhukai. All rights reserved.
//

#import "KZKouYuInputTestVC.h"

#import "KZRecordEvaluationTool.h"

@interface KZKouYuInputTestVC ()

@end

@implementation KZKouYuInputTestVC


- (void)viewDidLoad {
    [super viewDidLoad];
    
    
}
- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    
    KZRecordEvaluationTool *tool = [KZRecordEvaluationTool new];
//    [tool startRecordWithWordsCallback:^(NSString *sentence, NSArray *words) {
//        NSLog(@"%@", sentence);
//        NSLog(@"%@", words);
//    }];
    [tool startRecordWithWordsCallback:^(NSString *sentence, NSArray *words) {
        NSLog(@"%@", sentence);
        NSLog(@"%@", words);
    } soundIntensityCallback:^(CGFloat soundIntensity) {
        NSLog(@"%lf", soundIntensity);
    }];

    
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(3 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
        [tool endRecord];
    });
}




@end
